//
//  DYCFriendTrendViewController.m
//  DYCBaisi
//
//  Created by ChaoMac on 17/7/11.
//  Copyright © 2017年 Yachao. All rights reserved.
//

#import "DYCFriendTrendViewController.h"
#import "DYCLoginRegisterViewController.h"
#import "UITextField+DYCPlaceholder.h"
@interface DYCFriendTrendViewController ()


@property (weak, nonatomic) IBOutlet UITextField *textField;

@end

@implementation DYCFriendTrendViewController

// 点击登录注册就会调用
- (IBAction)clickLoginRegister:(id)sender {
    // 进入到登录注册界面
    DYCLoginRegisterViewController *registerVC = [[DYCLoginRegisterViewController alloc] init];
    [self presentViewController:registerVC animated:YES completion:nil];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
    // 分析:为什么先设置占位文字颜色,就没有效果 => 占位文字label拿不到
    // 1.保存起来
    // 设置占位文字颜色
    _textField.placeholderColor = [UIColor greenColor];
    
    // 设置占位文字:每次设置占位文字的后,在拿到之前保存占位文字颜色,重新设置
//        [_textField setDyc_Placeholder:@"123"];
    _textField.placeholder = @"123";
    
    
    [self setupNavBar];
}

#pragma mark - 设置导航条
- (void)setupNavBar
{
    // 左边按钮
    // 把UIButton包装成UIBarButtonItem.就导致按钮点击区域扩大
    self.navigationItem.leftBarButtonItem = [UIBarButtonItem itemWithimage:[UIImage imageNamed:@"friendsRecommentIconN"] highImage:[UIImage imageNamed:@"friendsRecommentIcon-clickN"] target:self action:@selector(tagClick)];
    
    
    // titleView
    self.navigationItem.title = @"我的关注";
}

#pragma mark - 点击订阅标签调用
- (void)tagClick
{
    DYCLogFunc
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
